import request from '@/utils/request'

// 获取-部门列表
export const getDepartment = () => request.get('/company/department')

// 获取-负责人列表
export const getManager = () => request.get('/sys/user/simple')

// 新增
export const addDepart = (data) => request.post('/company/department', data)

// 获取-部门详情
export const getDepart = id => request.get(`/company/department/${id}`)

// 修改-部门列表
// export const updateList = (data) => request.put(`/company/department/${data.id}`, data)
export function updateList(data) {
  return request({
    method: 'put',
    url: `/company/department/${data.id}`,
    data
  })
}

// 删除-部门列表
export const delDepart = id => request.delete(`/company/department/${id}`)
